home *** CD-ROM | disk | FTP | other *** search
- Path: news.dacom.co.kr!bora!hanchrok
- From: hanchrok@bora.dacom.co.kr (Han Chi Rok)
- Newsgroups: comp.lang.c
- Subject: Q: atof with far* to string
- Date: 18 Feb 1996 06:06:43 GMT
- Organization: DACOM Internet
- Message-ID: <4g6flj$rme@nis.dacom.co.kr>
- NNTP-Posting-Host: bora.dacom.co.kr
- X-Newsreader: TIN [version 1.2 PL2]
-
- Help me.
- I made a function that can be used in Windows programming.
-
- void func(LPSTR lpszData)
- {
- ...
- double dValue=atof(lpszData);
- // ----
- }
-
- When compiled with COMPACT or LARGE model, it works good.
- But when I try to compile it with SMALL or MEDIUM model,
- the compiler sends me error message that
- 'unsigned char far*' cannot be converted into 'unsigned char*'.
-
- I think 'atof' needs argument 'char far*' with COMPACT or LARGE,
- but 'char*' with SMALL or MEDIUM model.
- But I have to call it with far pointer to string even under
- SMALL or MEDIUM memory model.
- atof((char near*)lpszData) gives only a wrong reference.
- ------------
- Help me, please.
- Thanks in advance.
-
- Chirok from Seoul
-
-